package com.cnbbx.office.Controller;

public class BaseController {

    public static String error(String title, String note) {
        if (title.isEmpty()) title = "Error 404";
        if (note.isEmpty()) note = "糟糕，您要找的网页不存在。。。";
        return "<style>\n" +
                "  * {\n" +
                "    padding: 0;\n" +
                "    margin: 0;\n" +
                "  }\n" +
                "\n" +
                "  body,\n" +
                "  html {\n" +
                "    height: 100%;\n" +
                "  }\n" +
                "\n" +
                "  body {\n" +
                "    display: -webkit-box;\n" +
                "    display: -webkit-flex;\n" +
                "    display: -ms-flexbox;\n" +
                "    display: flex;\n" +
                "    margin: 0;\n" +
                "    padding: 0;\n" +
                "    background-color: #446072;\n" +
                "    font-family: \"Microsoft YaHei\", sans-serif;\n" +
                "    color: white;\n" +
                "    -webkit-box-pack: center;\n" +
                "    -webkit-justify-content: center;\n" +
                "    -ms-flex-pack: center;\n" +
                "    justify-content: center;\n" +
                "    -webkit-box-align: center;\n" +
                "    -webkit-align-items: center;\n" +
                "    -ms-flex-align: center;\n" +
                "    align-items: center;\n" +
                "    -webkit-box-orient: vertical;\n" +
                "    -webkit-box-direction: normal;\n" +
                "    -webkit-flex-direction: column;\n" +
                "    -ms-flex-direction: column;\n" +
                "    flex-direction: column;\n" +
                "    overflow: hidden;\n" +
                "  }\n" +
                "\n" +
                "  h1 {\n" +
                "    margin-top: 2rem;\n" +
                "  }\n" +
                "\n" +
                "  p {\n" +
                "    font-family: \"Microsoft YaHei\", \"Segoe UI\", \"Lucida Grande\", Helvetica, Arial, sans-serif;\n" +
                "  }\n" +
                "\n" +
                "  .shelf {\n" +
                "    position: relative;\n" +
                "    width: 30rem;\n" +
                "    height: 14rem;\n" +
                "    border: 0.5rem solid #374d5b;\n" +
                "    border-radius: 0.5rem;\n" +
                "    background-color: rgba(255, 255, 255, 0.1);\n" +
                "    -webkit-perspective: 130rem;\n" +
                "    perspective: 130rem;\n" +
                "    box-shadow: inset 0 0 2rem rgba(0, 0, 0, 0.2);\n" +
                "  }\n" +
                "\n" +
                "  .shelf a {\n" +
                "    text-decoration: none;\n" +
                "  }\n" +
                "\n" +
                "  .door {\n" +
                "    position: absolute;\n" +
                "    width: 14.8rem;\n" +
                "    height: 14rem;\n" +
                "    display: -webkit-box;\n" +
                "    display: -webkit-flex;\n" +
                "    display: -ms-flexbox;\n" +
                "    display: flex;\n" +
                "    box-sizing: border-box;\n" +
                "    padding: 1rem;\n" +
                "    background-color: #374d5b;\n" +
                "    -webkit-box-align: center;\n" +
                "    -webkit-align-items: center;\n" +
                "    -ms-flex-align: center;\n" +
                "    align-items: center;\n" +
                "    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);\n" +
                "  }\n" +
                "\n" +
                "  .door::before {\n" +
                "    width: 1.5rem;\n" +
                "    height: 1.5rem;\n" +
                "    border-radius: 50%;\n" +
                "    background-color: rgba(0, 0, 0, 0.1);\n" +
                "    content: \"\";\n" +
                "  }\n" +
                "\n" +
                "  .door.left {\n" +
                "    border-radius: 0 0.75rem 0.75rem 0;\n" +
                "    -webkit-box-pack: end;\n" +
                "    -webkit-justify-content: flex-end;\n" +
                "    -ms-flex-pack: end;\n" +
                "    justify-content: flex-end;\n" +
                "    -webkit-animation: leftDoorOpen 3.5s ease-out forwards 1s,\n" +
                "    leftDoorFlap 15s linear infinite forwards 9s;\n" +
                "    animation: leftDoorOpen 3.5s ease-out forwards 1s,\n" +
                "    leftDoorFlap 15s linear infinite forwards 9s;\n" +
                "    -webkit-transform-origin: 0 0 0;\n" +
                "    transform-origin: 0 0 0;\n" +
                "  }\n" +
                "\n" +
                "  .door.right {\n" +
                "    right: 0;\n" +
                "    border-radius: 0.75rem 0 0 0.75rem;\n" +
                "    -webkit-animation: rightDoorOpen 3s ease-out forwards 1.5s,\n" +
                "    rightDoorFlap 10s linear infinite forwards 8s;\n" +
                "    animation: rightDoorOpen 3s ease-out forwards 1.5s,\n" +
                "    rightDoorFlap 10s linear infinite forwards 8s;\n" +
                "    -webkit-transform-origin: 100% 0 0;\n" +
                "    transform-origin: 100% 0 0;\n" +
                "  }\n" +
                "\n" +
                "  .book {\n" +
                "    position: absolute;\n" +
                "    box-sizing: border-box;\n" +
                "    padding: 0.8rem 4rem 0.8rem 2rem;\n" +
                "    border-radius: 0.25rem;\n" +
                "    background-color: rgba(255, 255, 255, 0.1);\n" +
                "    color: white;\n" +
                "    font-size: 1rem;\n" +
                "    text-transform: uppercase;\n" +
                "    letter-spacing: 0.1rem;\n" +
                "    cursor: pointer;\n" +
                "    box-shadow: inset 0 0 0.75rem rgba(255, 255, 255, 0.1);\n" +
                "  }\n" +
                "\n" +
                "  .book.home-page {\n" +
                "    -webkit-transform: rotate(-90deg) translate(-12.4rem, 3rem);\n" +
                "    transform: rotate(-90deg) translate(-12.4rem, 3rem);\n" +
                "    -webkit-transform-origin: 0;\n" +
                "    transform-origin: 0;\n" +
                "  }\n" +
                "\n" +
                "  .book.about-us {\n" +
                "    -webkit-transform: rotate(-100deg) translate(-13.4rem, 6.1rem);\n" +
                "    transform: rotate(-100deg) translate(-13.4rem, 6.1rem);\n" +
                "    -webkit-transform-origin: 0;\n" +
                "    transform-origin: 0;\n" +
                "  }\n" +
                "\n" +
                "  .book.contact {\n" +
                "    right: 2rem;\n" +
                "    bottom: 0.2rem;\n" +
                "    border-radius: 0.3rem 0 0 0.3rem;\n" +
                "  }\n" +
                "\n" +
                "  .book.faq {\n" +
                "    right: 0.8rem;\n" +
                "    bottom: 3.3rem;\n" +
                "    border-radius: 0.3rem 0 0 0.3rem;\n" +
                "  }\n" +
                "\n" +
                "  .book.not-found {\n" +
                "    width: 12rem;\n" +
                "    height: 3.5rem;\n" +
                "    border: 1px dashed rgba(255, 255, 255, 0.3);\n" +
                "    background-color: transparent;\n" +
                "    -webkit-transform: rotate(-90deg) translate(-12rem, 13rem) scale(1);\n" +
                "    transform: rotate(-90deg) translate(-12rem, 13rem) scale(1);\n" +
                "    -webkit-transform-origin: 0;\n" +
                "    transform-origin: 0;\n" +
                "    cursor: default;\n" +
                "    -webkit-animation: bookFadeOut 1s 3s infinite forwards;\n" +
                "    animation: bookFadeOut 1s 3s infinite forwards;\n" +
                "  }\n" +
                "\n" +
                "  .book.not-found::after {\n" +
                "    display: block;\n" +
                "    width: 10rem;\n" +
                "    padding-left: 5rem;\n" +
                "    background-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='30'><path fill='rgb(255, 255, 255)' d='M7.688,3.737C6.1,10.409,4.624,16.982,2.475,23.517c-0.424,1.29,0.724,2.338,1.957,1.916 c5.879-2.021,11.743-4.107,17.409-6.696c1.246-0.572,0.443-2.366-0.815-1.932c-3.856,1.333-7.695,2.69-11.565,3.959 c2.879-2.526,5.485-5.215,9.013-7.17c4.441-2.459,9.299-4.109,14.281-4.915c10.903-1.772,22.052,0.562,31.979,5.04 c9.241,4.162,12.895,8.725,13.164,4.942c0.121-1.69-5.57-4.953-14.125-8.714C53.19,5.292,41.094,3.539,29.636,6.058 c-7.122,1.567-16.708,5.374-22.064,11.544c1.359-4.455,2.461-9.028,3.032-13.563C10.852,2.091,8.12,1.927,7.688,3.737z'/></svg>\");\n" +
                "    background-repeat: no-repeat;\n" +
                "    background-size: 4rem;\n" +
                "    background-position: left center;\n" +
                "    font-family: \"Dancing Script\";\n" +
                "    text-transform: lowercase;\n" +
                "    font-size: 25px;\n" +
                "    content: \"this page can't be found\";\n" +
                "    -webkit-transform: rotate(90deg) translate(6rem, -1rem);\n" +
                "    transform: rotate(90deg) translate(6rem, -1rem);\n" +
                "    opacity: 0.3;\n" +
                "  }\n" +
                "\n" +
                "  .book:hover:not(.not-found) {\n" +
                "    background-color: rgba(255, 255, 255, 0.2);\n" +
                "  }\n" +
                "\n" +
                "  @-webkit-keyframes leftDoorOpen {\n" +
                "    60% {\n" +
                "      -webkit-transform: rotateY(-115deg);\n" +
                "      transform: rotateY(-115deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @keyframes leftDoorOpen {\n" +
                "    60% {\n" +
                "      -webkit-transform: rotateY(-115deg);\n" +
                "      transform: rotateY(-115deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @-webkit-keyframes rightDoorOpen {\n" +
                "    60% {\n" +
                "      -webkit-transform: rotateY(125deg);\n" +
                "      transform: rotateY(125deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @keyframes rightDoorOpen {\n" +
                "    60% {\n" +
                "      -webkit-transform: rotateY(125deg);\n" +
                "      transform: rotateY(125deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @-webkit-keyframes rightDoorFlap {\n" +
                "    0% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "    5% {\n" +
                "      -webkit-transform: rotateY(125deg);\n" +
                "      transform: rotateY(125deg)\n" +
                "    }\n" +
                "    15% {\n" +
                "      -webkit-transform: rotateY(117deg);\n" +
                "      transform: rotateY(117deg)\n" +
                "    }\n" +
                "    25% {\n" +
                "      -webkit-transform: rotateY(123deg);\n" +
                "      transform: rotateY(123deg)\n" +
                "    }\n" +
                "    30% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @keyframes rightDoorFlap {\n" +
                "    0% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "    5% {\n" +
                "      -webkit-transform: rotateY(125deg);\n" +
                "      transform: rotateY(125deg)\n" +
                "    }\n" +
                "    15% {\n" +
                "      -webkit-transform: rotateY(117deg);\n" +
                "      transform: rotateY(117deg)\n" +
                "    }\n" +
                "    25% {\n" +
                "      -webkit-transform: rotateY(123deg);\n" +
                "      transform: rotateY(123deg)\n" +
                "    }\n" +
                "    30% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(120deg);\n" +
                "      transform: rotateY(120deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @-webkit-keyframes leftDoorFlap {\n" +
                "    0% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "    5% {\n" +
                "      -webkit-transform: rotateY(-115deg);\n" +
                "      transform: rotateY(-115deg)\n" +
                "    }\n" +
                "    15% {\n" +
                "      -webkit-transform: rotateY(-107deg);\n" +
                "      transform: rotateY(-107deg)\n" +
                "    }\n" +
                "    25% {\n" +
                "      -webkit-transform: rotateY(-113deg);\n" +
                "      transform: rotateY(-113deg)\n" +
                "    }\n" +
                "    30% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @keyframes leftDoorFlap {\n" +
                "    0% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "    5% {\n" +
                "      -webkit-transform: rotateY(-115deg);\n" +
                "      transform: rotateY(-115deg)\n" +
                "    }\n" +
                "    15% {\n" +
                "      -webkit-transform: rotateY(-107deg);\n" +
                "      transform: rotateY(-107deg)\n" +
                "    }\n" +
                "    25% {\n" +
                "      -webkit-transform: rotateY(-113deg);\n" +
                "      transform: rotateY(-113deg)\n" +
                "    }\n" +
                "    30% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "    100% {\n" +
                "      -webkit-transform: rotateY(-110deg);\n" +
                "      transform: rotateY(-110deg)\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @-webkit-keyframes bookFadeOut {\n" +
                "    50% {\n" +
                "      border: 1px dashed rgba(255, 255, 255, 0.1);\n" +
                "    }\n" +
                "  }\n" +
                "\n" +
                "  @keyframes bookFadeOut {\n" +
                "    50% {\n" +
                "      border: 1px dashed rgba(255, 255, 255, 0.1);\n" +
                "    }\n" +
                "  }\n" +
                "</style>\n" +
                "<nav class=\"shelf\">\n" +
                "  <a class=\"book home-page\">\n" +
                "                倩狐智能系统\n" +
                "            </a>\n" +
                "  <a class=\"book about-us\">\n" +
                "                倩狐达人排行\n" +
                "            </a>\n" +
                "  <a class=\"book contact\">\n" +
                "                倩狐品牌\n" +
                "            </a>\n" +
                "  <a class=\"book faq\">\n" +
                "                倩狐研究院\n" +
                "            </a>\n" +
                "  <span class=\"book not-found\">\n" +
                "            </span>\n" +
                "  <span class=\"door left\">\n" +
                "            </span>\n" +
                "  <span class=\"door right\">\n" +
                "            </span>\n" +
                "</nav>\n" +
                "<h1>\n" +
                title +
                "</h1>\n" +
                "<p>\n" +
                note +
                "</p>";
    }
}
